Skip to main content

3D Object Protocol

  • Septopus uses three.js as its rendering engine. In order to facilitate the separation of the Septopus Engine and the extension that can provide multi-rendering engine rendering, the call to three.js is encapsulated into this library.

  • three.js is a complex 3D rendering engine with a large amount of code, which is split into another file in the three library.

Library Reference

  • The encapsulated entry file is entry.js, which is introduced as a single file.

  • There are only two methods to request this library, namely get and mesh, and their functions are shown in the following table.

MethodFunctionTarget
getGet the built-in objects of three.jsAll 3D components
meshGenerate a mesh for rendering and put it into the scene for 3D displayGeometry and Materials

Object Category

  • After organizing three.js, the following categories of objects and methods will be referenced
CategoryMain FunctionFile location
Basic ComponetThe foundation and core objects of 3D rendering environment construction, such as scenes, cameras, meshes, etc.THREE_FOLDER/basic
GeometryCreating geometric objects for 3D contentTHREE_FOLDER/geometry
LightDifferent lighting effects for basic lighting and creating atmosphereTHREE_FOLDER/light
MaterialGive different materials to geometry to create rich and colorful 3D contentTHREE_FOLDER/material
TextureParse the image and use it as the texture of the materialTHREE_FOLDER/texture
LoaderLoad models created by different types of external 3D softwareTHREE_FOLDER/loader
ExtendSecondary packaging componentsTHREE_FOLDER/extend